#!/bin/bash
set -e

#libevent释放并编译
cd 3rd
[ -d libevent-2.1.12-stable ] || tar -zxvf libevent-2.1.12-stable.tar.gz
cd libevent-2.1.12-stable
[ -f Makefile ] || ./configure --disable-openssl
make

#copy libevent静态库
cp .libs/libevent.a ../../lib/


#通过CMake编译主程序
cd ../../build
cmake ..
make
